//
//  MLElementButtonItem.h
//  CustomerPo
//
//  Created by molon on 8/12/14.
//  Copyright (c) 2014 molon. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MLElementButtonView.h"

typedef void (^MLElementButtonItemClickBlock)(MLElementButtonView *elementView,MLElementButtonItem *elementItem);

@class MLElementButtonItemCombination;
@interface MLElementButtonItem : NSObject

@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *imageName;

//点击和长按的block,如果需要自定义的话，不需要则使用combination的
@property (nonatomic, copy) void(^customClickBlock)(MLElementButtonView *elementView,MLElementButtonItem *elementItem);

/**
 *  这个不需要自己指定。在塞到Conbination里的时候会自动设置
 */
@property (nonatomic, weak) MLElementButtonItemCombination *combination;

@end

@interface MLElementButtonItemCombination : NSObject

@property (nonatomic, strong) NSArray *elements;
@property (nonatomic, assign) CGFloat elementWidth;
//一般如果要显示名称，则比宽度多15.0f(希望按钮为正方形的情况下)
@property (nonatomic, assign) CGFloat elementHeight;
@property (nonatomic, assign) CGFloat elementXSpacing;
@property (nonatomic, assign) CGFloat elementYSpacing;

@property (nonatomic, strong) UIColor *customTitleColor;
@property (nonatomic, assign) UIViewContentMode buttonContentMode;
@property (nonatomic, copy) NSString *bkgImageName;

//例如对于IOS默认表情，需要搞这个。
@property (nonatomic, assign) BOOL isUseNameAsImage;

//是否不需要显示标题
@property (nonatomic, assign) BOOL isNotNeedDisplayTitle;

//点击和长按的block
@property (nonatomic, copy) void(^clickBlock)(MLElementButtonView *elementView,MLElementButtonItem *elementItem);

@end
